<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><{$title}>-<{$config.company}></title>
</head>
<link href="<{$config.weburl}>/module/sns/templates/home/home.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<{$config.weburl}>/script/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="<{$config.weburl}>/script/jquery.ui.js"></script>
<script type="text/javascript" src="<{$config.weburl}>/script/jquery.validation.min.js"></script>
<script type="text/javascript" src="<{$config.weburl}>/script/jquery.charCount.js"></script>
<script type="text/javascript" src="<{$config.weburl}>/script/sns.js"></script>
<script>
$(function(){
	//加关注
	$("[genre='followbtn']").live('click',function(){
		
		var url = '<{$config.weburl}>/module/sns/ajax_update.php';
		var uname='<{$smarty.cookies.USER}>';
		if(uname=='')
		{
			alert('<{$lang.no_logo}>');
			window.location.href='<{$config.weburl}>/login.php?forward=shop.php?uid=<{$smarty.get.uid}>';
			return false;
		}
		var data_str = $(this).attr('data-param');
        eval( "data_str = "+data_str);
		var pars = 'mid='+data_str.mid+'&uname='+uname+'&op=add';
		$.post(url, pars,showResponse);
		function showResponse(originalRequest)
		{
			if(originalRequest>1)
				alert('成功添加');
			else if (originalRequest>0)
				alert('已添加');
			else
				alert('参数传递错误，无法完成操作');
		}
	});
});
</script>
<body>
<div id="site-nav">
    <div id="site-nav-bd">
    	<p class="login-info"><script src="<{$config.weburl}>/login_statu.php"></script></p>
        <ul class="quick-menu">
            <li class="user-center">
                <div class="menu">
                    <a href="<{$config.weburl}>/main.php?cg_u_type=1" class="menu-hd">我的商城<b></b></a>
                    <div class="menu-bd">
                    <ul>
                        <li><a href="<{$config.weburl}>/main.php?cg_u_type=1&m=product&s=admin_buyorder">已买到的商品</a></li>
                        <li><a target="_blank" href="<{$config.weburl}>/home.php?uid=<{$userid}>">个人主页</a></li>
                        <li><a href="<{$config.weburl}>/main.php?cg_u_type=1&m=sns&s=admin_friends">我的好友</a></li>
                    </ul>
                    </div>
                </div>
            </li>
            <li class="seller-center">
                <div class="menu">
                    <a href="<{$config.weburl}>/main.php?cg_u_type=2" class="menu-hd">卖家中心<b></b></a>
                    <div class="menu-bd">
                    <ul>
                        <li><a href="<{$config.weburl}>/main.php?cg_u_type=2&m=product&s=admin_sellorder">已售出的商品</a></li>
                        <li><a href="<{$config.weburl}>/main.php?cg_u_type=2&m=product&s=admin_product_list">销售中的商品</a></li>
                        <li><a target="_blank" href="<{$config.weburl}>/shop.php?uid=<{$userid}>">我的店铺</a></li>
                    </ul>
                    </div>
                </div>
            </li>
            <li class="cart">
				<span class="menu-hd"><s></s><a href="<{$config.weburl}>/?m=product&s=cart">购物车<strong class="goods_num"><script src="<{$config.weburl}>/?m=product&s=cart_number"></script></strong>种商品</a><i></i></span>
            </li>
            <li class="favorite">
                <div class="menu">
                    <a href="<{$config.weburl}>/main.php?cg_u_type=1" class="menu-hd">我的收藏<b></b></a>
                    <div class="menu-bd">
                    <ul>
                        <li><a href="<{$config.weburl}>/main.php?cg_u_type=1&m=sns&s=admin_share_product">收藏的商品</a></li>
                        <li><a href="<{$config.weburl}>/main.php?cg_u_type=1&m=sns&s=admin_share_shop">收藏的店铺</a></li>
                    </ul>
                    </div>
                </div>
            </li>
            <li><a href="<{$config.weburl}>/main.php?m=message&s=admin_message_list_inbox">站内消息</a></li>
        </ul>
    </div>
</div>

<div id="header">
	<div class="wrapper">
		<h1 id="logo"><a href="<{$config.weburl}>"><img style="padding-top:5px;" height=40 src="<{if $config.logo}><{$config.logo}><{else}><{$config.weburl}>/image/default/logo.gif<{/if}>" /></a></h1>
    	<h2>个人主页</h2>
        <div class="search">
        <form method="get" action="<{$config.weburl}>/" id="formSearch">
            <input type="text" class="text" id="key" name="key">
          	<input type="hidden" name="m" value="" />
            <input type="hidden" name="s" value="list" />
			<a onclick="$('#formSearch').submit();" href="javascript:void(0)"> <span>搜索</span> </a>
        </form>
        </div>
    </div>
</div>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div id="container">
	<div id="content" class="wrapper">
    	<div class="head">
        	<div class="info clearfix">
            	<div class="info-left">
                	<div class="basic-info">
                        <div class="realy-info">
                       		<span class="credit">买家信用</span>
                            <img class="points" align="absmiddle" title="<{$member.buyerpoints}>个买家信用积分" src="image/points/<{$member.buyerpointsimg}>">
                        </div>
                        <div class="meta">
                        	<span class="sex<{if $member.sex==2}> female<{/if}>"><{if $member.sex==2}>女<{else}>男<{/if}></span>
                        	<span><{$member.area}></span><br />
							<span><a href="<{$config.weburl}>/shop.php?uid=<{$smarty.get.uid}>">逛TA商铺</a></span>
                        </div>
                        <h2 class="name"><div class="nick"><{$member.name}></div></h2>
                    </div>
                    <div class="user-avatar"><img width="160" height="160" src="<{if $member.logo}><{$member.logo}><{else}>image/default/avatar.png<{/if}>"></div>
                </div>
                <div class="info-right">
                	<div class="attention-box">
                        <div class="attention clearfix">
                            <ul>
                                <li><a href="#"><b class="large"><{$count.f}></b></a><span>粉丝</span></li>
                                <li><a href="#"><b class="large"><{$count.g}></b></a><span>关注</span></li>
                                <li><a href="#"><b class="large"><{$count.v}></b></a><span>访问</span></li><li class="clear"></li>
                            </ul>
                        </div>
                    </div>
                    <{if $smarty.get.uid!=$userid}>
						<div class="follow-widget">
							<{if $friend}>
								<span class="<{if $fan}>all_gz<{else}>have_gz<{/if}>">
								<b style="margin-left:25px;">已关注</b> &nbsp;&nbsp;
								<a href="main.php?m=message&s=admin_message_sed&uid=<{$smarty.get.uid}>">发私信</a></span>
							<{else}>
								<a genre="followbtn" data-param="{'mid':'<{$smarty.get.uid}>'}" href="javascript:void(0)"></a>
							<{/if}>
						</div>
                    <{/if}>
                </div>
            </div>
            <div class="clear"></div>
            <div class="nav">
            	<ul class="clearfix">
                	<li class="<{if $smarty.get.act==''}>current <{/if}>first">
                    	<a class="front" href="<{$config.weburl}>/home.php?uid=<{$smarty.get.uid}>">首页</a>
                    </li>
                    <li <{if $smarty.get.act=='product'}>class="current"<{/if}> >
                    	<a class="product" href="<{$config.weburl}>/home.php?uid=<{$smarty.get.uid}>&act=product">宝贝</a>
                    </li>
                    <li class="<{if $smarty.get.act=='trace'}>current <{/if}>last">
                    	<a class="trace" href="<{$config.weburl}>/home.php?uid=<{$smarty.get.uid}>&act=trace">新鲜事</a>
                    </li>
                </ul>
            </div>
        </div>
        
        <div class="body clearfix">
        	<div class="body-main <{if $smarty.get.act=='product'}>pro<{/if}>"><{$output}></div>
        	<{if $smarty.get.act!='product'}>
            <div class="body-side">
            	<div class="visitors">
					<h4><em>最近访客</em></h4>   
					<ul class="visitlist">
                    	<{foreach item=list key=nums from=$visitors}>
                        <li>
                            <p class="visitor_pic">
                                <a target="_blank" href="home.php?uid=<{$list.userid}>"><img height="60" width="60" src="<{if $list.logo!=''&&$list.logo!='0'}><{$list.logo}><{else}>image/default/user_admin/default_user_portrait.gif<{/if}>" /></a>
                            </p>
                            <p class="visitor_name"><a target="_blank" href="home.php?uid=<{$list.userid}>"><{$list.user}></a></p>
                            <p class="visitor_time"><{$list.time|date_format:"%m月 %d日"}></p>
                        </li>
                        <{foreachelse}>
                        <span>&nbsp;&nbsp;暂无访客</span>
                        <{/foreach}>
                    </ul> 
                </div>
            </div>
            <{/if}>
        </div>
    </div>
</div>
<div id="footer">
    <div class="footer">
        <p><{$web_con}></p>
        <{$bt}><br>
    </div>
</div>
</body>
</html>
